#include <STC15F2K60S2.H>
unsigned char i;
code unsigned char tab[] = { 0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,
                             0xff
                           };
unsigned char dspbuf[8] = {10,10,10,10,10,10,10,10};  
void display(void)
{
	P2 =((P2&0x1F)|0xc0);
  P0 = 0x00;
	P0 = (1<<i);
	P2&= 0x1F;
 P2 =((P2&0x1F)|0xe0);
	P0 = tab[i];
  P2&= 0x1F;
	if(++i==8)
	{
		i=0;
	}
	
}